package com.heima.article.controller.v1;


import com.heima.article.service.ApArticleConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/article")
public class ApArticleConfigController {

    @Autowired
    private ApArticleConfigService configService;

    /**
     * 查看文章是否可以评论
     * @param articleId
     * @return
     */
    @GetMapping("/config/{articleId}")
    public Boolean isComment(@PathVariable Long articleId){
        return configService.isComment(articleId);
    }
}
